The present invention relates to an electronic controller for repeatedly executing an input process (A-D conversion, etc.), operations (program execution), and an output process (output by a serial signal) in a predetermined cycle.
In a power conversion system and a power supply system for controlling power and an industrial system and a traffic system for controlling a motor, a power converter and a motor drive circuit composed of many switching elements are controlled by an electronic controller, thus power conversion and motor driving are realized. Such an electronic controller repeatedly executes in a predetermined cycle the action of sampling a current and a voltage of a power line and a motor, thereby performing A-D conversion, performing operations on the basis of the converted digital value, generating a pulse signal on the basis of the command value obtained from the calculated result, and turning on or off the switching elements of the power converter and motor drive circuit. This cycle is called a control cycle.
In the power control and motor control, it is required to improve the control accuracy, thus high-speed control such as a control cycle of less than several hundreds microseconds or several tens microseconds is required.
For such control, it is necessary not only to surely execute sampling for the A-D conversion at predetermined timing but also to surely output the command value and pulse signal at predetermined timing. For example, even if the sampling for the A-D conversion is executed in a predetermined cycle at predetermine timing, when the command value and pulse signal are outputted immediately after completion of the operations, the required time for the operations varies with the conditions at that time, so that an error is caused at the output timing of the command value and pulse signal.
As an art for solving it, for example, as described in Japanese Laid-open Patent Publication No. Hei 10-285910, pages 1 to 21 and FIGS. 1 to 15, it is known to provide the control cycle for performing the sampling (input process) for the A-D conversion and the pulse generation (output process) cycle for generating the pulse signal, make the difference in phase between them fixed, and execute the sampling for the A-D conversion and outputting the on/off pulse in the respective cycles.
By doing this, the sampling for the A-D conversion and the outputting of the pulse signal can be surely executed at predetermined timing, and the pulse generation cycle is adjusted to expectable operation end timing, thus the response time from the sampling (input process) for the A-D conversion to the outputting (output process) of the pulse signal can be shortened.
On the other hand, for example, in Japanese Laid-open patent Publication No. Hei 06-324811, pages 1 to 15 and FIGS. 1 to 9, it is proposed under control of an A-D converter having a plurality of input channels to send data after A-D conversion at external timing, prevent a control circuit (operation means) from frequent interruptions of data after conversion from the A-D conversion means, thereby lighten the processing load on the control circuit.